namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class BlogArticleTagMap : ClassMap<BlogArticleTagDataModel>
    {
        #region Constructors and Destructors

        public BlogArticleTagMap()
        {
            this.Table("BlogArticleTag");
            this.LazyLoad();
            this.CompositeId()
                .KeyProperty(x => x.ArticleId, "ArticleId")
                .KeyProperty(x => x.TagName);

            // .KeyReference(x => x.Tag, "TagCultureCode");

            // References(x => x.Article).Column("ArticleId");
            // References(x => x.Tag).Columns("TagName", "TagCultureCode");
            //References(x => x.Tag).Column("TagCultureCode");
        }

        #endregion
    }
}